
import {http} from "@/utils/http";

// 获取项目列表
export const getProfessionalCategoryListAPI=(cur,pageSize)=>{
    return http.get('/professionalCategory/list',{
        params:{
            cur,
            pageSize
        }
    })
}

// 获取项目数量
export const getProfessionalCategoryCountAPI=()=>{
    return http.get('/professionalCategory/allCount')
}

// 根据id查询
export const getProfessionalCategoryInfoAPI=(id)=>{
    return http({
        method:'GET',
        url:`/professionalCategory/getInfo/${id}`,
        params:{
            id
        }
    })
}

// 新增
export const addOneProfessionalCategoryAPI=(oneProfessionalCategory)=>{
    return http.post('/professionalCategory/save',oneProfessionalCategory)
}

// 删除
export const deleteOneProfessionalCategoryAPI=(id)=>{
    return http.delete(`/professionalCategory/remove/${id}`,{
        params:{
            id
        }
    })
}

// 修改
export const updateOneProfessionalCategoryAPI=(oneProfessionalCategory)=>{
    return http.put('/professionalCategory/update',oneProfessionalCategory)
}



// 根据项目名称查询项目数量
export function getProfessionalCategoryCountByNameAPI(name){
    return http({
        method:'GET',
        url:`/professionalCategory/getByNameCount`,
        params:{
            name
        }
    })
}


// 根据项目名称查询项目
export function getProfessionalCategoryListByNameAPI(name,cur,pageSize){
    return http({
        method:'GET',
        url:`/professionalCategory/getByName`,
        params:{
            name,
            cur,
            pageSize
        }
    })
}

